<template>
	<view class="rechrge-page">
		<view class="currency">
			<view class="currency-top">
				<u--image :showLoading="true" src="/static/my/coin.png" width="60rpx" height="60rpx"></u--image>
				<view class="currency-title">
					加密货币
				</view>
			</view>
			<view class="currency-item" v-for="(item,index) in List" :key="index" @click="pickCoin(index)">
				<view class="item-left">
					<view :class="item.stutas == true?'activeLine':'line'"></view>
					<u--image :showLoading="true" :src="item.url" width="50rpx" height="50rpx"></u--image>
					<view class="item-title">
						<view class="item-name">
							{{item.name}}
						</view>
						<view class="item-text">
							{{item.text}}
						</view>
					</view>
				</view>
				<u--image v-if="item.stutas == false" :showLoading="true" src="/static/my/ty.png" width="30rpx"
					height="30rpx"></u--image>
				<u--image v-else :showLoading="true" src="/static/my/tick.png" width="30rpx" height="30rpx"></u--image>
			</view>
		</view>
		<view class="amount">
			储值金额
		</view>
		<view class="amount-int">
			<u--input placeholder="10.00 USD起" border="none" v-model="amount"></u--input>
		</view>
		<view class="btn">
			<u-button size="large" shape="circle" type="primary" text="下一步"></u-button>
		</view>
		<u-popup round="20" :show="show" mode="center" @close="close">
			<view class="tips">
				<view class="title">
					温馨提示
				</view>
				<view class="text">
					尊敬的客户：
					<br>
					为了一直致力于为您提供安全、高效的服务，在您进行储值时，请务必注意以下事项：
					<br>
					<br>
					①平台仅支持 ERC-20 和 TRC-20 类型的区块链数字货币收款，
					为了确保您的充值顺畅，请在转账前核对好所选择的渠道，
					并确保您的转账类型正确.对于转错其他类型的情况，我们将无法负责处理.
					<br>
					②为避免造成金额损失,请您切勿保存收款地址,错误地址将导致您的存款无法到账等.
					<br>
					③储值时间7X24小时.但订单只存在60分钟,请您在获取订单后,尽快完成储值.
					<br>
					④为了避免文字理解差异,我司保留最终解释权.
					<br>
					⑤如有任何问题,请联系电邮我司客服,我们将尽快为您提供帮助.
				</view>
				<view class="tips-bnt">
					<u-button shape="circle" size="large" color="#333333" type="primary" text="确定"
						@click="close"></u-button>
				</view>
			</view>
		</u-popup>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				show: true,
				List: [{
						name: 'USDT-TRC20',
						text: 'TRON',
						url: '/static/my/TR.png',
						stutas: true
					},
					{
						name: 'USDT-ERC20',
						text: 'Ethereum',
						url: '/static/my/ER.png',
						stutas: false
					},
				],
				amount: ''
			}
		},
		methods: {
			close(e) {
				this.show = false
			},
			pickCoin(index) {
				this.List.map(item => {
					item.stutas = false
				})
				this.List[index].stutas = true
			}
		}
	}
</script>

<style lang="scss" scoped>
	.rechrge-page {
		padding: 30rpx;

		.tips {
			width: 684rpx;
			padding: 30rpx;

			.title {
				text-align: center;
				font-weight: 600;
				font-size: 30rpx;
			}

			.text {
				color: rgba(51, 51, 51, .6);
				font-size: 30rpx;
				padding: 30rpx 0;
			}

			.tips-btn {
				margin-top: 20rpx;
			}
		}

		.currency {
			padding: 30rpx;
			background-color: #f8f8f8f8;
			border-radius: 30rpx;

			.currency-top {
				display: flex;
				align-items: center;

				.currency-title {
					margin-left: 20rpx;
					font-weight: 700;
					font-size: 30rpx;
				}
			}

			.currency-item {
				display: flex;
				align-items: center;
				justify-content: space-between;
				margin-top: 40rpx;

				.item-left {
					display: flex;
					align-items: center;

					.line {
						background-color: #494949;
						width: 6rpx;
						height: 40rpx;
						margin-right: 30rpx;
					}

					.activeLine {
						background-color: #1fa0b3;
						width: 6rpx;
						height: 40rpx;
						margin-right: 30rpx;
					}

					.item-title {
						margin-left: 30rpx;

						.item-name {
							font-size: 30rpx;
						}

						.item-text {
							font-size: 26rpx;
							color: #bbbbbb;
						}
					}
				}
			}
		}

		.amount {
			padding: 30rpx 0;
			font-size: 32rpx;
			color: #333333;
		}

		.amount-int {
			background-color: #F6FAFF;
			border-radius: 20rpx;
			padding: 30rpx;
		}

		.btn {
			margin-top: 40rpx;
		}
	}
</style>